package com.jams.goodox.entity;

import com.jams.goodox.net.BaseEntity;

/**
 * Created by Jin on 2016/5/17.
 * Description 积分兑换订单提交返回的结果
 */
public class PointBuyProductResult extends BaseEntity {
    /**
     * orderCode : 2016021700001
     * orderId : 849724b5-d544-11e5-9a5a-00163e005381
     * referTime : 2016-02-17 15:03:16
     * sendNotice : false
     * type : 0
     */

    private DataBean data;

    public DataBean getData() {
        return data;
    }

    public void setData(DataBean data) {
        this.data = data;
    }

    public static class DataBean {
        private String orderCode;
        private String orderId;
        private String referTime;
        private boolean sendNotice;
        private int type; //错误类型 0正常 1积分不够 2商品被抢光

        public String getErrorType() {
            switch (type) {
                case 1:
                return "积分不够";
                case 2:
                return "商品被抢光";
            }
            return "";
        }

        public String getOrderCode() {
            return orderCode;
        }

        public void setOrderCode(String orderCode) {
            this.orderCode = orderCode;
        }

        public String getOrderId() {
            return orderId;
        }

        public void setOrderId(String orderId) {
            this.orderId = orderId;
        }

        public String getReferTime() {
            return referTime;
        }

        public void setReferTime(String referTime) {
            this.referTime = referTime;
        }

        public boolean isSendNotice() {
            return sendNotice;
        }

        public void setSendNotice(boolean sendNotice) {
            this.sendNotice = sendNotice;
        }

        public int getType() {
            return type;
        }

        public void setType(int type) {
            this.type = type;
        }
    }
}
